function required(field,alerttxt)
{
	with (field)
	  {
	  if (value==null||value=="")
	    {
	    	alert(alerttxt);
			return false;
	    }
	  else
	    {
	    	return true;
	    }
	  }
}

function isNumeric(field,alerttxt){
	var sText = field.value;
   	var ValidChars = "0123456789.-";
   	var IsNumber=true;
   	var Char;
 
   	for (i = 0; i < sText.length && IsNumber == true; i++) { 
      	Char = sText.charAt(i); 
      	if (ValidChars.indexOf(Char) == -1) {
         	IsNumber = false;
         	alert(alerttxt);
		}
	}
   	return IsNumber;
}